<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>

<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>

    <%
    	Long offset = (Long) request.getAttribute("offset");
            String groupId = (String)request.getAttribute("groupId");
    %>
	 <table class="${tableclass}" style="width: 100%">
	    <thead>
	    	<tr><th> <strong class="am-text-primary am-text-lg">系统管理</strong> /  
	    	<c:choose>
	    		<c:when test="${groupId=='sy'}">系统配置</c:when>
	    		<c:when test="${groupId=='sh'}">商城配置</c:when>
	    		<c:when test="${groupId=='ma'}">邮件配置</c:when>
	    		<c:when test="${groupId=='ln'}">登录配置</c:when>
	    		<c:when test="${groupId=='lo'}">日志配置</c:when>
	    	</c:choose>
	    	</th></tr>
	    </thead>
	</table>

	<c:if test="${groupId eq 'ln' }">
		<!-- tab -->
	    <div style="margin-left: 0.5rem">
			<div class="seller_list_title">
	          <ul class="seller_title_ul am-tabs-nav am-nav am-nav-tabs">
	          	 <li><i></i><a href="<ls:url address='/admin/system/systemParameter/query/ln_model'/>">登录方式配置</a></li>
	         	 <li class="am-active"><i></i><a href="<ls:url address='/admin/system/systemParameter/query/ln'/>">登录参数配置</a></li>
	         </ul>
	        </div>
	   </div>
   </c:if>
   
	<!-- 搜索 -->
	<div align="left" style="padding: 15px 5px 5px 5px;">
		<form:form action="${contextPath}/admin/system/systemParameter/query/${groupId}" id="form1" method="get">
	       <input type="hidden" id="curPageNO" name="curPageNO" value="${curPageNO}" />
	          &nbsp; 参数名称&nbsp;<input type="text" name="name" id="name" maxlength="50" size="50" value="${bean.name}" class="${inputclass}"/>
	       <input type="button" onclick="search()" value="搜索" class="${btnclass}"/>
	    </form:form>
	 </div>
	 
    <div align="center">
        <%@ include file="/WEB-INF/pages/common/messages.jsp"%>
    <display:table name="list" requestURI="/admin/system/systemParameter/query/${groupId}" id="item"
         export="false" class="${tableclass}" style="width:100%">
      <display:column title="顺序"  class="orderwidth"><%=offset++%></display:column>
      <display:column title="功能说明" property="memo" style="min-width:180px"></display:column>
      <display:column title="参数名称" property="name"></display:column>
      <display:column title="参数值">
      	<c:choose>
      		<c:when test="${item.type == 'Selection'}">
      			  <ls:optionGroup type="label" required="true" cache="true"
	                beanName="${item.optional}" selectedValue="${item.value}"/>
      		</c:when>
      		<c:when test="${item.type == 'Password'}">
      			   <c:if test="${not empty item.value}">[protected]</c:if>
      		</c:when>
      		<c:otherwise>${item.value}</c:otherwise>
      	</c:choose>
      </display:column>
      <display:column title="操作" media="html" style="width: 90px;" >
       <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
                   <button class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="window.location='${contextPath}/admin/system/systemParameter/load/${item.name}'"><span class="am-icon-pencil-square-o"></span> 编辑</button>
          </div>
       </div>
      </display:column>
    </display:table>
        <ls:page pageSize="${pageSize }"  total="${total}" curPageNO="${curPageNO }"  type="default"/>
    </div>
    
    <script language="JavaScript" type="text/javascript">
<!--
        function pager(curPageNO){
            document.getElementById("curPageNO").value=curPageNO;
            document.getElementById("form1").submit();
        }
        
        highlightTableRows("item");  
        function search(){
		  	$("#form1 #curPageNO").val("1");//只要是搜索,都是从第一页开始查
		  	$("#form1")[0].submit();
		}
//-->
</script>


